package com.miyake.client.datamanage;

import java.util.ArrayList;
import java.util.List;

import com.google.gwt.user.client.rpc.IsSerializable;

public class NodeProperty implements IsSerializable {
	public static final int ROOTNODE =	0x0001;
	public static final int FOLDER =	0x0002;
	public static final int DATA =		0x0004;
	public static final int PLOT = 		0x0008;
	public static final int TABLE = 	0x0010;
	public static final int TEXT = 		0x0020;
	public static final int IMAGE = 	0x0040;
	public static final int PAPER = 	0x0080;
	public static final int ALIAS = 	0x0100;

	private String name;
	private String key;
	private Integer type;
	private Integer securityLevel;
//	private String substKey;
	
	private List<NodeProperty> children = new ArrayList<NodeProperty>();
private String parentKey;

	public NodeProperty(){}
	
	
	public NodeProperty(String name, String key, Integer type) {
		super();
		this.name = name;
		this.key = key;
		this.type = type;
//		this.substKey = substKey;
	}

	public String getName() {
		return name;
	}


	public void setName(String name) {
		this.name = name;
	}


	public String getKey() {
		return key;
	}


	public void setKey(String key) {
		this.key = key;
	}


	public Integer getType() {
		return type;
	}


	public void setType(Integer type) {
		this.type = type;
	}

	public Integer getSecurityLevel() {
		return securityLevel;
	}


	public void setSecurityLevel(Integer securityLevel) {
		this.securityLevel = securityLevel;
	}


	public List<NodeProperty> getChildren() {
		return children;
	}

	public void setChildren(List<NodeProperty> children) {
		this.children = children;
	}
	
	public void addChild(NodeProperty child) {
		this.children.add(child);
	}


	public void setParentKey(String parentKey) {
		this.parentKey = parentKey;
	}
	
	public String getParentKey() {
		return this.parentKey;
	}
}
